package com.lgl.scs.wx.controller;

import com.lgl.scs.base.controller.BaseController;
import com.lgl.scs.wx.service.WxUserRateService;
import com.lgl.scsapi.system.model.AppUser;
import com.lgl.scsapi.system.model.PageData;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户评价controller
 */
@RestController
@RequestMapping(value="/wx/userRate")
public class WxUserRateController extends BaseController{
	@Resource(name = "wxUserRateService")
	private WxUserRateService wxUserRateService;

	//提交用户评价信息
	@RequestMapping(value="/submitUserRate",produces="application/json;charset=UTF-8")
	public Object submitUserRate() throws Exception {
		PageData pd = this.getPageData();
		AppUser user = this.getSessionAppUser();
		return wxUserRateService.saveUserRate(pd,user);
	}

}